package Demo1;

public class text1 {
    public static void fun1(Animer animer){
        animer.eat();
    }
    public static void textfly(iFly ifly){
        ifly.fly();
    }
public static void textimpo(impo im){
        im.text();
}
    public static void main(String[] args) {
        textimpo(new Frog("青蛙王子"));
    }
    public static void main2(String[] args) {
        fun1(new Dog("旺财"));
        fun1(new Bird("菜鸟"));
        textfly(new Bird("菜鸟"));
    }
    public static void main1(String[] args) {
fun1(new Dog("旺财"));
fun1(new Bird("菜鸟"));
    }
}
